package com.fuxi.cloud.desreport.a;

import com.fuxi.cloud.common.vo.Result;
import com.fuxi.cloud.desreport.entity.JimuReportLink;
import com.fuxi.cloud.desreport.service.IJimuReportLinkService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * b
 *
 * @Author: 扫地僧
 * @CreateTime: 2021-05-03
 */
@RestController("jimuReportLinkController")
@RequestMapping({"/jmreport/link"})
public class d {
    private static final Logger a = LoggerFactory.getLogger(d.class);
    @Autowired
    private IJimuReportLinkService reportLinkService;

    public d() {
    }

    @PostMapping({"/saveAndEdit"})
    public Result<String> a(@RequestBody JimuReportLink var1) {
        Result var2 = new Result();
        String var3 = this.reportLinkService.saveAndEdit(var1);
        var2.setSuccess(true);
        var2.setResult(var3);
        return var2;
    }

    @PostMapping({"/delete"})
    public Result<?> b(@RequestBody JimuReportLink var1) {
        this.reportLinkService.removeById(var1.getId());
        return Result.OK("删除成功!");
    }

    @GetMapping({"/queryByIds"})
    public Result<?> a(@RequestParam(name = "ids",required = true) String var1) {
        List var2 = this.reportLinkService.queryByIds(var1);
        return Result.OK(var2);
    }
}
